package gblend.formatcovert;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



import gblend.adjlistgraph.ALGraph;
import java.util.Comparator;

/**
 *
 * @author cjjin
 */

public class GraphCompare implements Comparator{

   public int compare(Object o1, Object o2) {
    ALGraph e1=(ALGraph)o1;
    ALGraph e2=(ALGraph)o2;
    if(e1.getNnum()>e2.getNnum()||e1.getNnum()==e2.getNnum()&&e1.getEnum()>e2.getEnum())
    {
        return 1;
    }
    else if(e1.getNnum()==e2.getNnum()&&e1.getEnum()==e2.getEnum())
    {
        return 0;
    }
    else
    {
        return -1;
    }
    }

}